/**
 * 
 */
package com.maxin.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.maxin.entity.Orderdetail;

/**
 * @author: maxin
 * @description: 订单详情表mapper
 */
public interface OrderdetailMapper {
	@Insert("insert into orderdetail(ntitle, ncontent) values(#{ntitle}, #{ncontent})")
	int insert(Orderdetail orderdetail);
	
	@Delete("delete from orderdetail where id = #{id}")
	int deleteById(long id);
	
	@Update("update orderdetail set ntitle = #{ntitle}, ncontent = #{ncontent} where id = #{id}")
	int updateByName(Orderdetail orderdetail);
	
	@Select("select * from orderdetail where id = #{id}")
	Orderdetail selectById(String id);
	
	@Select("select * from orderdetail")
	List<Orderdetail> selectAll();
	
	@Select("select * from orderdetail limit #{pageIndex}, #{pageSize}")
	List<Orderdetail> selectByPage(int pageIndex, int pageSize);
}
